Contents | < Browse | Browse >
ARexx-Operator
This operator makes it possible to exchange images with other applications.
The basic concept is to produce an ARexx-script which causes the application
to load, process and save a temperary image created by Wildfire.
Parameters
Name Possible Values/Unit Description
Input STREAM, TEMP1, ..., TEMP8 input buffer
Ouput STREAM, TEMP1, ..., TEMP8 output buffer
Port string ARexx-port of the application
Temp-File string path for the temperorary image to be created
Add (gadget) add a line to the ARexx-script
Kill (gadget) kill the selected line
Up (gadget) move the selected line up
Down (gagget) move the selected line down
Clear (gadget) clear the whole script
Add Variable (gadget) add a variable-entry to the selected line
Import (gadget) load a previously saved script
Export (gadget) save the current script to disk
A "normal" script should contain the three parts:
-loading of the temporary image created by Wildfire
-processing of this image
-saving of the result
The 3rd part is the only important.
Every line of the script has to be entered in the format of
a C-printf-command. This allows one to use Envelopes in
such an ARexx-script.
The basic syntax is as follows: "<formatstring>",arguments
(The enclosing '"'-characters are important.)
Three formats are supported:
"%s" - for strings
"%d" - for integer parameters
"%f" - for float parameters
The number of format-specifiers must be always equal to the number
of arguments. Any special formats-strings like "%.4lf" are
not supported.
Examples:
line to be entered: line generated by Wildfire:
"integer: %d",10.3 integer: 10
"float: %f",10.3 float: 10.3
"i: %d, f: %f, s: '%s'",4,3,str i: 4, f: 3.0, s: 'str'
To use an Envelope simply enter it's name as argument, rounding
is performed if you specify "%d" as corresponding formatstring.
The filename of the temporary image can be omitted using
the predefined argument "tempfile".
Now let's create a working example. Assume you want to have
ADPro to halve your images and to apply an Antique-effect
to the result.
At first you have to set the path of your application (which
will be started automatically if it's port cannot be located)
from within the Preferences-Window .
After that you have to specify the portname, in this case "ADPro".
At first entry in the script you should specify ADPro's default Loader:
"lformat "universal""
Now the image can be loaded
"load '%s'",tempfile
Apply the effects:
"operator halve"
"operator antique"
Specify the the Saver to use:
"sformat "iff""
Save the image:
"save '%s' raw",tempfile
That's all. Now you should save this script
"lformat "universal""
"load '%s'",tempfile
"operator halve"
"operator antique"
"sformat "iff""
"save '%s' raw",tempfile
as "reference-script". For further purposes only the "operator"-lines
have to be replaced.